Skip to content

test(local): raise server.spec.ts CLI-exit timeout and log actual duration - #843

Merged
YusukeHirao merged 1 commit into
devfrom
worktree-validated-swimming-puppy
Aug 1, 2026
Merged

test(local): raise server.spec.ts CLI-exit timeout and log actual duration#843
YusukeHirao merged 1 commit into
devfrom
worktree-validated-swimming-puppy

Conversation

@YusukeHirao

Copy link
Copy Markdown
Member

概要

packages/@burger-editor/local/src/commands/server.spec.tsrunServerCommand boot (virtualTree) 系テストが、yarn test(Docker 経由のフルスイート実行)で時折 CLI did not exit within 8000ms で失敗する問題(#841)を修正します。

原因

runCli() の子プロセス起動(tsx 経由での TypeScript ソース実行)が、Docker(QEMU エミュレーション込み)+他プロジェクト(core / custom-element / blocks / vr)が同時に Playwright ブラウザインスタンスを起動する負荷下で、ハードコードされた 8000ms を超えることがありました。

対応内容

  • runCli() のデフォルト timeoutMs を 8000ms → 20000ms に引き上げ、対応する2つの test() のタイムアウトも 15000ms → 25000ms に引き上げ
  • runCli() に開始時刻の計測を追加し、プロセス終了時に実際の所要時間を console.info でログ出力するようにしました。次回 flaky が発生した際に「8000ms を超えた」という二値情報ではなく、実測データを CI ログから得られるようにするためです

検証

  • NX_WORKSPACE_ROOT_PATH を指定した worktree 内で yarn buildyarn test(Docker 経由フルスイート)を実行し、全90ファイル・984テストがパスすることを確認
  • 追加したログにより、該当テストの実測所要時間が 8734ms(旧タイムアウト値 8000ms を実際に超過)であることを確認し、今回の引き上げが有効であることを実データで裏付け

関連

…ation

runCli()'s 8000ms hard timeout occasionally flaked under full-suite Docker
runs, where the concurrently-running Playwright browser projects add CPU
contention that slows tsx's cold-start compile beyond that budget (#841).

Raise the default to 20_000ms (test timeouts to 25_000ms) and log the real
elapsed time on every exit so future flakes leave duration data instead of
a binary pass/fail.
@YusukeHirao
YusukeHirao merged commit 7a40009 into dev Aug 1, 2026
1 check passed
@YusukeHirao
YusukeHirao deleted the worktree-validated-swimming-puppy branch August 1, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(local): server.spec.ts's 8s CLI-exit timeout is flaky under full-suite Docker load

1 participant